/*
 * @Author: your name
 * @Date: 2019-11-28 17:46:20
 * @LastEditTime: 2019-12-01 15:38:47
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \web\avue-cli\src\api\sysSetup\laboratory.js
 */
import request from "@/router/axios";
import qs from "qs";
/**
 * @description: 采购管理 get data
 * @param {object}
 * @return: promise
 */
export const getDangerousPurchasing = (data = {}) =>
  request({
    url: "/dangerousPurchasing/v1/pageQuery",
    method: "post",
    data: qs.stringify(data)
  });
/**
 * @description: 采购管理  新增
 * @param {object}
 * @return: promise
 */
export const addDangerousPurchasing = (data = {}) =>
  request({
    url: "/dangerousPurchasing/v1/insert",
    method: "post",
    data: qs.stringify(data)
  });
/**
 * @description: 采购管理  审批状态查看
 * @param {object}
 * @return: promise
 */
export const dangerousPurchasingState = (data = {}) =>
  request({
    url: "/dangerousPurchasing/v1/approval/status",
    method: "post",
    data: qs.stringify(data)
  });
/**
 * @description: 采购管理  根据类型id去查危险品物品
 * @param {object}
 * @return: promise
 */
export const getGoodsTypeInfo = (data = {}) =>
  request({
    url: "/goodsTypeInfo/v1/pageQuery",
    method: "post",
    data: qs.stringify(data)
  });
/**
 * @description: 采购管理  保存采购单
 * @param {object}
 * @return: promise
 */
export const addGoods = (data = {}) =>
  request({
    url: "/dangerousPurchasing/v1/insert",
    method: "post",
    data: (data)
  });
/**
 * @description: 采购管理  提交采购单
 * @param {object}
 * @return: promise
 */
export const addGoodsUp = (data = {}) =>
  request({
    url: "/dangerousPurchasing/v1/submission",
    method: "post",
    data: qs.stringify(data)
  });
/**
 * @description: 采购管理  所有危险品类型
 * @param {object}
 * @return: promise
 */
export const getDangerousType = (data = {}) =>
  request({
    url: "/dangerousType/v1/findAll",
    method: "post",
    data: qs.stringify(data)
  });
/**
 * @description: 采购管理  审核
 * @param {object}
 * @return: promise
 */
export const dangerousToExamine = (data = {}) =>
  request({
    url: "/dangerousPurchasing/v1/toExamine",
    method: "post",
    data: qs.stringify(data)
  });
/**
 * @description: 采购管理  撤销
 * @param {object}
 * @return: promise
 */
export const dangerousRevoke = (data = {}) =>
  request({
    url: "/dangerousPurchasing/v1/revoke",
    method: "post",
    data: qs.stringify(data)
  });
/**
 * @description: 采购管理  查看  根据id查询
 * @param {object}
 * @return: promise
 */
export const dangerousFindById = (data = {}) =>
  request({
    url: "/dangerousPurchasing/v1/findById",
    method: "post",
    data: qs.stringify(data)
  });
/**
 * @description: 采购管理  id删除
 * @param {object}
 * @return: promise
 */
export const deleteDangerous = (data = {}) =>
  request({
    url: "/dangerousPurchasing/v1/getById",
    method: "post",
    data: qs.stringify(data)
  });
/**
 * @description: 采购管理 修改
 * @param {object}
 * @return: promise
 */
export const updateDangerous = (data = {}) =>
  request({
    url: "/dangerousPurchasing/v1/update",
    method: "post",
    data: (data)
  });
/**
 * @description: 采购管理 查询修改物品数据
 * @param {object}
 * @return: promise
 */
export const getUpdateDangerous = (data = {}) =>
  request({
    url: "/dangerousPurchasingInfo/v1/pageQuery",
    method: "post",
    data: qs.stringify(data)
  });

/**
 * @description: 采购管理 查询修改物品数据
 * @param {object}
 * @return: promise
 */
export const getDangerousDetailed = (data = {}) =>
    request({
        url: "/dangerousPurchasing/v1/findByIds",
        method: "post",
        data: data
    });